<template>
  <div>
    <h1>App组件</h1>
    <div>
      <button @click="homeFn">首页</button>
      <button @click="movieFn">电影</button>
      <button @click="aboutFn">关于</button>
    </div>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  methods: {
    homeFn(){
      this.$router.push("/home")
    },
    movieFn(){
      this.$router.push({
        path: "/movie"
      })
    },
    aboutFn(){
      this.$router.push({
        name: "about"
      })
    }
  }
};
</script>

<style>
</style>